<div class="line-label">
  <%= page_entries_info(@customers) %>
</div>

<% if @customers.size > 0 %>
  <% paginated_section(@customers, options_will_paginate({:params => {:controller => :customers, :action => :selector_people_list_from_paginate, :search_last_name => params[:search_last_name]}})) do %>
    <table style="min-width: 580px; max-width: 580px;">
        <thead>
          <tr>
            <th><%=t('activerecord.attributes.people.last_name')%></th>
            <th><%=t('activerecord.attributes.people.first_name')%></th>
            <th><%=t('activerecord.attributes.customer.city')%></th>
            <th><%=t('title_actions')%></th>
          </tr>
        </thead>
        <tbody>
          <% @customers.each do |customer| %>
            <tr>
              <td><%=h customer.last_name %></td>
              <td><%=h customer.first_name %></td>
              <td><%=if !customer.city.nil? then h customer.city.name end%></td>
              <td class="action" style="text-align: center;"><a href = "javascript:void(0)" onclick = "jQuery(function ($) {$.modal.close();});setContactCustomer(<%=customer.id%>,'<%=session[:customer_component_id]%>','<%=customer.class.name%>','<%=session[:customer_component_type]%>','<%="#{customer.first_name} #{customer.last_name}"%>','<%=session[:customer_component_name]%>');"><%=t('btn_selected')%></a></td>
            </tr>
          <% end %>
         </tbody>
      </table>
  <% end %>
<% end %>
